/*
  flamingo - 2D Game Engine
  Copyright (C) 2009 Bradley Zeis

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

  Bradley Zeis
  flamingoengine@gmail.com
*/

/* -------- UTILITY -------- */
void uchange_tier(Sprite *spr, int new_tier);
int uObjectState_SetColor(ObjectState *self, PyObject *color);
void uObjectState_interpolate(ObjectState *self, ObjectState *other, ObjectState *o, double i);

/* -------- OBJECTSTATE METHODS -------- */
/* Initialization */
void ObjectState_dealloc(ObjectState *self);
PyObject *ObjectState_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
int ObjectState_init(ObjectState *self, PyObject *args);
PyObject *ObjectState_reduce(ObjectState *self);
/* Presentation */
PyObject *ObjectState_repr(ObjectState *self);
PyObject *ObjectState_str(ObjectState *self);
/* General Functions */
PyObject *ObjectState_copy(ObjectState *self);
void ObjectState_merge(ObjectState *self, ObjectState *other);
PyObject *ObjectState_interpolate(ObjectState *self, PyObject *args);

/* -------- SPRITE METHODS -------- */
/* Initialization */
void Sprite_dealloc(Sprite *self);
PyObject *Sprite_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
int Sprite_init(Sprite *self, PyObject *args, PyObject *kwds);
PyObject *Sprite_hash(Sprite *self);
/* Presentation */
PyObject *Sprite_repr(Sprite *self);
PyObject *Sprite_str(Sprite *self);
/* Mapping Operations */
Py_ssize_t Sprite_length(Sprite *self);
PyObject *Sprite_subscript(Sprite *self, PyObject *key);
/* General Functions */
PyObject *Sprite_public_update(Sprite *self, PyObject *args);
PyObject *Sprite_update(Sprite *self, PyObject *args);
PyObject *Sprite_change_skin(Sprite *self, PyObject *args);
PyObject *Sprite_add_skin(Sprite *self, PyObject *args);
PyObject *Sprite_remove_skin(Sprite *self, PyObject *args);
PyObject *Sprite_merge_skins(Sprite *self, PyObject *args);
PyObject *Sprite_add(Sprite *self, PyObject *args);
PyObject *Sprite_remove(Sprite *self, PyObject *args);
PyObject *Sprite_kill(Sprite *self);
PyObject *Sprite_groups(Sprite *self, PyObject *args);
PyObject *Sprite_alive(Sprite *self, PyObject *args);
PyObject *Sprite_interpolate(Sprite *self, PyObject *args);
void Sprite_interpolate_internal(Sprite *self, double interpolation);
/* Properties */
/* Center */
PyObject *Sprite_getcenter(Sprite *self, void *closure);
int Sprite_setcenter(Sprite *self, PyObject *value, void *closure);
PyObject *Sprite_getcenterx(Sprite *self, void *closure);
int Sprite_setcenterx(Sprite *self, PyObject *value, void *closure);
PyObject *Sprite_getcentery(Sprite *self, void *closure);
int Sprite_setcentery(Sprite *self, PyObject *value, void *closure);
/* Angle/Orientation */
PyObject *Sprite_getangle(Sprite *self, void *closure);
int Sprite_setangle(Sprite *self, PyObject *value, void *closure);
PyObject *Sprite_getorientation(Sprite *self, void *closure);
int Sprite_setorientation(Sprite *self, PyObject *value, void *closure);
/* State */
PyObject *Sprite_getstate(Sprite *self, void *closure);
PyObject *Sprite_getprevstate(Sprite *self, void *closure);
/* Color */
PyObject *Sprite_getcolor(Sprite *self, void *closure);
int Sprite_setcolor(Sprite *self, PyObject *value, void *closure);
/* Parent */
PyObject *Sprite_getparent(Sprite *self, void *closure);
int Sprite_setparent(Sprite *self, PyObject *value, void *closure);
/* Skins/Texture */
PyObject *Sprite_getskins(Sprite *self, void *closure);
PyObject *Sprite_gettexture(Sprite *self, void *closure);

/* -------- _GROUP METHODS -------- */
/* Initialization */
void Group_dealloc(Group *self);
void MGroup_dealloc(MGroup *self);
PyObject *Group_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
PyObject *MGroup_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
int Group_init(Group *self, PyObject *args);
int MGroup_init(Group *self, PyObject *args);
/* Presentation */
PyObject *Group_repr(Group *self);
PyObject *UGroup_repr(Group *self);
PyObject *MGroup_repr(Group *self);
PyObject *Group_str(Group *self);
PyObject *UGroup_str(Group *self);
PyObject *MGroup_str(Group *self);
/* General Functions */
PyObject *Group_update(Group *self, PyObject *args);
PyObject *UGroup_update(Group *self, PyObject *args);
void swap(PyObject *list, int x, int y);
void MGroup_sort(MGroup *self);
PyObject *MGroup_update(MGroup *self, PyObject *args);
PyObject *Group_add(Group *self, PyObject *args);
PyObject *MGroup_add(MGroup *self, PyObject *args);
PyObject *Group_remove(Group *self, PyObject *args);
PyObject *MGroup_remove(MGroup *self, PyObject *args);
PyObject *Group_sprites(Group *self);
PyObject *MGroup_sprites(MGroup *self);
PyObject *MGroup_active_sprites(MGroup *self);
PyObject *Group_empty(Group *self);
PyObject *MGroup_empty(MGroup *self);

PyMODINIT_FUNC initsprite(void);
